package com.ysjy.course.mapper;

import com.wkbb.common.base.BaseMapper;
import com.wkbb.common.vo.Tag;
import com.ysjy.course.model.CourseTime;
import com.ysjy.course.model.OrgCourse;
import com.ysjy.course.model.YsCourseHomeData;
import com.ysjy.course.model.YsCoursePackage;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface CourseMapper extends BaseMapper<OrgCourse> {

    void delCourseTimes(@Param("courseUniqueId") String courseUniqueId);

    void insertCourseTimeBatch(@Param("list")List<CourseTime> list);

    void insertOrgCourse(OrgCourse data);

    void updateOrgCourse(OrgCourse data);

    void updateShelvesStatus(@Param("ids") String ids, @Param("shelvesStatus") Integer shelvesStatus);

    List<OrgCourse> getOrgListByPage(Map<String, Object> params);

    //增加采集数量
    void gatherNumAdd(@Param("uniqueId") String uniqueId);

    OrgCourse getCourseByUniqueId(String uniqueId);

    OrgCourse getOrgCourseByUniqueId(@Param("uniqueId") String uniqueId,@Param("studentId") Long studentId);

    List<CourseTime> getCourseTimeListByUniqueId(String uniqueId);

    void deleteOrgCourseByPrimaryKey(Long id);

    List<OrgCourse> getOrgCourseList(Map<String, Object> params);

    OrgCourse getOrgCourseById(Long id);

    Map<String, Object> getCourseCount(Map<String, Object> params);

    YsCourseHomeData getCourseHomeData();

    int insertCoursePackage(YsCoursePackage data);
    int updateCoursePackage(YsCoursePackage data);

    void updatePackageShelvesStatus(@Param("ids") String ids, @Param("shelvesStatus") Integer shelvesStatus);

    YsCoursePackage getCoursePackageByUniqueId(@Param("uniqueId") String uniqueId,@Param("studentId") Long studentId);

    List<YsCoursePackage> getCoursePackageListByPage(Map<String, Object> params);
}
